#include "selectionSort2.h"
#include<stdio.h>
#include<stdlib.h>
#include<malloc.h>
#include<time.h>

void selectionSort2(int vetor[],int tam, float* tempo)
{
 clock_t inicio, fim;
     inicio = clock();
 int i,j;
 int min,aux;
 for (i=0;i<tam-1;i++)
 {
   min=i;
   for (j=i+1;j<tam;j++)
   {
     if (vetor[j]<vetor[min]){
       min=j;       
     }
   }
   aux=vetor[i];
   vetor[i]=vetor[min];
   vetor[min]=aux;
   movimentarRegistro();
 }
 
     fim = clock();
     *tempo = ( (float)fim -(float)inicio ) / ( (float)CLOCKS_PER_SEC );
     printf("tempo select2=%f\n", *tempo );  // PENDENTE
}


